//
//  ViewController.swift
//  DemoTest
//
//  Created by Six on 2017-08-03.
//  Copyright © 2017 Haven. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.title = "Demo";
        let item = UIBarButtonItem(title: "Change", style: .plain, target: self, action: #selector(cc))
        self.navigationItem.rightBarButtonItem = item
    }
    
    func cc() -> Void {
        UIView.appearance().semanticContentAttribute = .forceLeftToRight
        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "ChangeLanguage"), object: nil)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


    @IBAction func test(_ sender: Any) {
        let vc = TestViewController()
        self.navigationController?.pushViewController(vc, animated: true)
    }
}

